package org.gourpg.model.permission;

/**
 * 权限角色关系实体
 */
public class PermissionRoleRel {
    /**
     * 权限ID，权限的主键
     */
    private Integer powerId;

    /**
     * 角色ID，角色的主键
     */
    private Integer roleId;

    public PermissionRoleRel() {
    }

    public Integer getPowerId() {
        return this.powerId;
    }

    public Integer getRoleId() {
        return this.roleId;
    }

    public void setPowerId(Integer powerId) {
        this.powerId = powerId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof PermissionRoleRel)) return false;
        final PermissionRoleRel other = (PermissionRoleRel) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$powerId = this.getPowerId();
        final Object other$powerId = other.getPowerId();
        if (this$powerId == null ? other$powerId != null : !this$powerId.equals(other$powerId)) return false;
        final Object this$roleId = this.getRoleId();
        final Object other$roleId = other.getRoleId();
        if (this$roleId == null ? other$roleId != null : !this$roleId.equals(other$roleId)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof PermissionRoleRel;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $powerId = this.getPowerId();
        result = result * PRIME + ($powerId == null ? 43 : $powerId.hashCode());
        final Object $roleId = this.getRoleId();
        result = result * PRIME + ($roleId == null ? 43 : $roleId.hashCode());
        return result;
    }

    public String toString() {
        return "PermissionRoleRel(powerId=" + this.getPowerId() + ", roleId=" + this.getRoleId() + ")";
    }
}
